<template>
	<view>
		<Back></Back>
		<view class="contraluation">恭喜你打开了</view>
		<view class="canteen_name" >{{canteen_name}}</view>
	</view>
</template>

<script>
	import Back from "@/components/back.vue"
	export default {
		components:{
			Back
		},
		data() {
			return {
				canteen_name: ""
			};
		},
		onLoad: function(option) {
			//转换this
			let _this = this 
			const eventChannel = this.getOpenerEventChannel()
			// 监听acceptDataFromOpenerPage事件，获取上一页面通过eventChannel传送到当前页面的数据
			eventChannel.on('tar', function(data) {
				_this.canteen_name = data.data
			})
		},
		methods: {
			
		}
	}
</script>

<style lang="scss">
	.contraluation{
		position: fixed;
		left: 50%;
		top: 40%;
		transform: translate(-50%,-50%);
		font-size: 50rpx;
	}
	.canteen_name {
		position: fixed;
		left: 50%;
		top: 50%;
		transform: translate(-50%,-50%);
		font-size: 50rpx;
	}
</style>
